{% extends 'base.html' %}
{% block title %}网络设备信息更新{% endblock %}

{% block content %}
<div id="page-wrapper">
    <div class="row">
        <div class="col-lg-12">
            <h3 class="page-header">网络设备信息</h3>
        </div>
    </div>
    <div class="row">
        <div class="col-lg-12">
            <ul class="nav nav-tabs">
                <li><a href="/assetmanage/network_table/">查看信息</a>
                </li>
                <li><a href="/assetmanage/network_add_html/">添加信息</a>
                </li>
                <li class="active"><a href="/assetmanage/network_update_html/">修改信息</a>
                </li>
                <li><a href="/assetmanage/network_del_html/">删除信息</a>
                </li>
            </ul>

            <div class="tab-content">
                <div class="tab-pane fade in active">
                    <div class="row">
                    <br>
                        <form action="/assetmanage/network_update/" method="get" role="form">
                        <ul>
                                <div class="form-group col-lg-4">
                                    <label style="color: orange"><label style="color: red">*</label> 服务编号：<input class="form-control" name="service_num" ></label>
                                    <label style="color: orange">设备信息：<input class="form-control" name="type_info"></label>
                                    <label style="color: orange">IP：<input class="form-control" name="server_ip"></label>
                                    <div class="form-group" style="margin-top:0px;margin-left:0px;margin-right:0px;margin-bottom:0px;">
                                        <label style="color: orange">数据中心：
                                            <select class="form-control" name="data_center">
                                                <option></option>
                                                <option>电信兆维</option>
                                                <option>世纪互联</option>
                                                <option>世纪互联M6</option>
                                                <option>互联通</option>
                                            </select>
                                        </label>
                                    </div>
                                </div>
                                </ul>
                                <ul>
                                <div class="form-group col-lg-4">
                                    <label style="color: orange">机房编号：<input class="form-control" name="room_num"></label>
                                    <label style="color: orange">机柜编号：<input class="form-control" name="rack_num"></label>
                                    <label style="color: orange">资产编号：<input class="form-control" name="asset_num"></label>
                                    <label style="color: orange">模块：<input class="form-control" name="module"></label>
                                </div>
                                </ul>
                                <ul>
                                <div class="form-group col-lg-4">
                                    <label style="color: orange">可用接口：<input class="form-control" name="available_intf"></label>
                                    <label style="color: orange">购买时间：<input class="form-control" name="buy_time"></label>
                                    <label style="color: orange">过期时间：<input class="form-control" name="expiration_time"></label>
                                    <label style="color: orange">备注：<input class="form-control" name="note"></label>
                                    <br><input class="btn btn-warning btn-sm" type="submit" value="更新">
                                </div>
                                </ul>
                        </form>
                    </div>
                    <br>
                    <label style="color: red;font-size: 14px;" class="fa fa-refresh"> 更新成功，附表如下：</label>
                    <div class="row"> 
                        <div class="col-lg-12">
                            <div class="table-responsive">
                            <pre style="line-height: 0px">
                                <table class="table table-bordered table-hover table-striped" style="margin-top:0px;margin-left:0px;margin-right:0px;margin-bottom:0px;">
                                    <thead>
                                        <tr>
                                            <th>服务编号</th>
                                            <th>设备信息</th>
                                            <th>IP</th>
                                            <th>数据中心</th>
                                            <th>机房编号</th>
                                            <th>机柜编号</th>
                                            <th>资产编号</th>
                                            <th>模块</th>
                                            <th>可用接口</th>
                                            <th>购买时间</th>
                                            <th>过期时间</th>
                                            <th>备注</th>
                                            <th>管理</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td>{{ network_update.service_num }}</td>
                                            <td>{{ network_update.type_info }}</td>
                                            <td>{{ network_update.server_ip }}</td>
                                            <td>{{ network_update.data_center }}</td>
                                            <td>{{ network_update.room_num }}</td>
                                            <td>{{ network_update.rack_num }}</td>
                                            <td>{{ network_update.asset_num }}</td>
                                            <td>{{ network_update.module }}</td>
                                            <td>{{ network_update.available_intf }}</td>
                                            <td>{{ network_update.buy_time }}</td>
                                            <td>{{ network_update.expiration_time }}</td>
                                            <td>{{ network_update.note }}</td>
                                            <td><a href="/assetmanage/network_update_arg_keep/?service_num={{ network_update.service_num }}"><button class="btn btn-warning btn-xs" type="button">更改</button></a> <a href="/assetmanage/network_del/?service_num={{ network_update.service_num }}"><button class="btn btn-danger btn-xs" type="button">删除</button></a></td>
                                        </tr>
                                    </tbody>
                                </table>
                            </pre>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>   
</div>
{% endblock %}